<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .demo1{
            width: 100px;
            height: 100px;
            border: 1px solid red;
            /* 情况1：设置个内边距 盒子大小被撑大了 */
            /* padding: 30px;  */
            padding-left: 30px;
            padding-top: 30px;
        }
        .father{
            width: 300px;
            height: 300px;
            background-color: red;
        }
        .son{
            /* 没有设置width 不会撑开盒子大小 */
            padding-left: 250px;
        }
    </style>
</head>
<body>
    <div class="demo1">demo1</div>
    <div class="father">
        divfather
        <div class="son">divson</div>
    </div>
</body>
</html>